import 'package:flutter/material.dart';

class TestPage extends StatelessWidget {
  const TestPage({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("Test"),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            buildAddress("1111"),
            buildAddress("2222"),
            buildAddress("3333"),
            buildAddress("44444"),
          ],
        ),
      ),
    );
  }

  Widget buildAddress(String address) {
    return Container(
      padding: const EdgeInsets.all(8),
      child: Row(
        children: [
          Flexible(
            flex: 5,
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                Container(
                  padding: const EdgeInsets.only(bottom: 8),
                  child: Text(
                    address,
                    style: TextStyle(
                      fontWeight: FontWeight.bold,
                      color: Colors.grey[800],
                    ),
                  ),
                ),
                Text(
                  'abc2222222222222222222222444444444444444455555555555',
                  style: TextStyle(color: Colors.grey[500]),
                ),
              ],
            ),
          ),
          Icon(
            Icons.star,
            color: Colors.red,
          ),
          Expanded(
            flex: 1,
            child: Text(
              maxLines: 1,
              "66622222226",
              overflow: TextOverflow.ellipsis,
              textAlign: TextAlign.left,
              textDirection: TextDirection.ltr,
            ),
          ),
          Icon(
            Icons.star,
            color: Colors.red,
          ),
        ],
      ),
    );
  }
}
